<template>
  <a-descriptions-item
    :span="span"
    :label-style="labelStyle"
    :label="label"
    :content-style="contentStyle"
  >
    <template v-if="$slots.label" #label>
      <slot name="label" />
    </template>
  </a-descriptions-item>
</template>

<script>
import { defineComponent } from 'vue'
import { DescriptionsItem } from 'ant-design-vue'

export default defineComponent({
  name: 'ZDescriptionsItem',
  components: { ADescriptionsItem: DescriptionsItem },
  props: {
    span: {
      type: Number,
      default: 1
    },
    labelStyle: {
      type: Object,
      default: undefined
    },
    label: {
      type: [String, Function],
      default: undefined
    },
    contentStyle: {
      type: Object,
      default: undefined
    }
  }
})
</script>
